﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Rhino.Commons;
using System.Collections;
using Rhino.Commons.Binsor;

namespace Web
{
    public class Container
    {
        public static T Resolve<T>()
        {
            return _Container.Resolve<T>();
        }

        public static T Resolve<T>(string key)
        {
            return _Container.Resolve<T>(key);
        }

        public static T Resolve<T>(IDictionary arguments)
        {
            return _Container.Resolve<T>(arguments);
        }

        public static T Resolve<T>(string key, IDictionary arguments)
        {
            return _Container.Resolve<T>(key, arguments);
        }

        private static RhinoContainer _Container;

        static Container(){ _Initialize(); }

        protected static void _Initialize()
        {
            _Container = new RhinoContainer();

            string path = AppDomain.CurrentDomain.BaseDirectory + @"\windsor.boo";
            Console.WriteLine(path);
            BooReader.Read(_Container, path);
        }

        
    }
}
